#ifndef __CESParser_H__
#define __CESParser_H__

#include "IESParser.h"
#include <string> 
#include <iostream> 
#include <stdio.h>

#define STREAM_LENGTH (2 * 188 )

/**
This class reads the ES stream from the specified file  and stores it in its array. 
*/
class CESParser : public IESParser
{
public:
	/*
	c'tor. should be provided with the file name that the user wants to read the ES stream from 
	*/
	CESParser(std::string sFileName);
	virtual ~CESParser(void);
	/*
	Reads the ES stream data from the file that was specified in the c'tor 
	@return 1 if at least one byte was read,0 otherwise
	*/
	virtual bool readData();
    /*@return the number of bytes that were read from the ES stream*/
	virtual int getSize();
	/*@return a pointer to the array that stores the ES stream data */
	virtual const char * getData();


private:
	FILE* m_pFile;
	char m_cBuffer[STREAM_LENGTH];
	int m_length;
};

#endif
